Skip to content

Adjust planar_filter_step to better handle parallel edges#232

Merged
zfergus merged 3 commits intomainfrom
fix/dat-parallel-ee
May 6, 2026
Merged

Adjust planar_filter_step to better handle parallel edges#232
zfergus merged 3 commits intomainfrom
fix/dat-parallel-ee

Conversation

@zfergus
Copy link
Copy Markdown
Member

@zfergus zfergus commented May 6, 2026

Description

Skip edge-edge planar filter for nearly-parallel edges with negligible approach velocity to avoid spurious truncation.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

- Rename CMake presets: "test-build" -> "test", "python-build" ->
  "python"
- Add unit test for stacked parallel cloth layers and helper maker
- Relax assert beta to allow zero root in TrustRegion
- Skip edge-edge planar filter for nearly-parallel edges with negligible
  approach velocity to avoid spurious truncation
Copilot AI review requested due to automatic review settings May 6, 2026 00:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts OGC Planar-DAT’s planar_filter_step to avoid spurious displacement truncation for edge-edge candidates when edges are nearly parallel and have negligible approach velocity, and adds a regression test intended to cover stacked parallel cloth layers.

Changes:

  • Add an early-exit in TrustRegion::planar_filter_step() to skip planar filtering for nearly-parallel edge-edge candidates with near-zero approach velocity.
  • Add Candidates::is_*() helpers to identify candidate types by flattened index.
  • Add a new OGC trust region test scenario and rename CMake build preset names.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/ipc/ogc/trust_region.cpp Adds edge-edge near-parallel / negligible-approach skip logic to reduce spurious planar truncation.
src/ipc/candidates/candidates.hpp Declares candidate-type query helpers (is_vertex_vertex, is_edge_vertex, etc.).
src/ipc/candidates/candidates.cpp Implements candidate-type query helpers based on the existing flattened indexing order.
tests/src/tests/ogc/test_trust_region.cpp Adds a cloth-layer regression test targeting planar filtering behavior with parallel edges.
CMakePresets.json Renames build preset names (test-buildtest, python-buildpython).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ipc/ogc/trust_region.cpp
Comment thread src/ipc/candidates/candidates.hpp Outdated
Comment thread tests/src/tests/ogc/test_trust_region.cpp Outdated
Comment thread src/ipc/ogc/trust_region.cpp
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 46.66667% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.75%. Comparing base (e454375) to head (f5d1bcd).

Files with missing lines Patch % Lines
src/ipc/candidates/candidates.cpp 20.00% 16 Missing ⚠️

❌ Your patch check has failed because the patch coverage (46.66%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   95.84%   95.75%   -0.10%     
==========================================
  Files         160      160              
  Lines       16589    16619      +30     
  Branches      919      919              
==========================================
+ Hits        15900    15913      +13     
- Misses        689      706      +17     
Flag Coverage Δ
unittests 95.75% <46.66%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

zfergus and others added 2 commits May 5, 2026 21:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@zfergus zfergus added this to the v1.6.0 milestone May 6, 2026
@zfergus zfergus merged commit b5370d9 into main May 6, 2026
20 of 21 checks passed
@zfergus zfergus deleted the fix/dat-parallel-ee branch May 6, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants